import 'package:thinking/entity/_.dart';

class PageEntity{

  int _page = 0;
  int _count = 6;
  bool _canLoad = true;

  int get page => _page;

  set setIsLoad(bool setIsLoad) {}
  set setPage(int page) => _page = page;
  int get count => _count;
  set setCount(int count) => _count = count;
  bool get canLoad => _canLoad;
  set setCanLoad(bool canLoad) => _canLoad = canLoad;

}

class SearchRecommend {

  int? _code;
  SearchRecommendResult? _data;
  String? _message;

  SearchRecommend({int? code,SearchRecommendResult? data,String? message}){
    this._code = code;
    this._data = data;
    this._message = message;
  }

  int? get code => _code;
  set setCode(int code)=>_code = code;
  String? get message => _message;
  set setMessage(String message) => _message = message;
  SearchRecommendResult? get data =>_data;
  set getData(SearchRecommendResult data) => _data = data;
  SearchRecommend.fromJson(Map<String,dynamic> json){

    _code = json['code'];
    _data = SearchRecommendResult.fromJson(json['data']);
    _message = json['message'];

  }

  Map<String,dynamic> toJson(){
    final Map<String,dynamic> data = new Map<String,dynamic>();
    data['code'] = this._code;
    data['message'] = this._message;
    data['data'] = this.data;

    return data;
  }

}

class SearchRecommendResult{

  List<SearchRecommendEntity>? _searchRecommendList;

  SearchRecommendResult({List<SearchRecommendEntity>? searchRecommendList}){
    this._searchRecommendList = searchRecommendList;
  }

  List<SearchRecommendEntity>? get searchRecommendList => _searchRecommendList;
  set setSearchRecommendList(List<SearchRecommendEntity> searchRecommendList)=>_searchRecommendList = searchRecommendList;


  SearchRecommendResult.fromJson(Map<String,dynamic> json){
    _searchRecommendList = [];
    if(json['searchRecommend'] != null  ){
      json['searchRecommend'].forEach((v) {
        _searchRecommendList!.add( SearchRecommendEntity.fromJson(v));
      });
    }

  }

  Map<String,dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this._searchRecommendList != null) {
      data['searchRecommend'] = this._searchRecommendList!.map((v) => v.toJson()).toList();

    }
    return data;
  }
}

class SearchRecommendEntity{

  int? _searchRecommendId;
  String? _searchRecommendTitle;
  int? _searchRecommendStatus;
  int? _searchRecommendType;

  int? get searchRecommendId => _searchRecommendId;
  set setSearchRecommendId(int searchRecommendId) => _searchRecommendId = searchRecommendId;
  String? get searchRecommendTitle => _searchRecommendTitle;
  set setSearchRecommendTitle(String searchRecommendTitle) => _searchRecommendTitle = searchRecommendTitle;
  int? get searchRecommendStatus => _searchRecommendStatus;
  set setSearchRecommendStatus(int searchRecommendStatus) => _searchRecommendStatus = searchRecommendStatus;
  int? get searchRecommendType => _searchRecommendType;
  set setSearchRecommendType(int searchRecommendType) => _searchRecommendType = searchRecommendType;

  SearchRecommendEntity({
    int? searchRecommendId,
    String? searchRecommendTitle,
    int? searchRecommendStatus,
    int? searchRecommendType,


  }){
    this._searchRecommendId = searchRecommendId;
    this._searchRecommendTitle = searchRecommendTitle;
    this._searchRecommendStatus = searchRecommendStatus;
    this._searchRecommendType = searchRecommendType;


  }

  SearchRecommendEntity.fromJson(Map<String, dynamic> json) {
    _searchRecommendId = json['searchRecommend_Id'];
    _searchRecommendTitle = json['searchRecommend_Title'];
    _searchRecommendStatus = json['searchRecommend_Status'];
    _searchRecommendType = json['searchRecommend_Type'];

  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['searchRecommend_Id'] = this._searchRecommendId;
    data['searchRecommend_Title'] = this._searchRecommendTitle;
    data['searchRecommend_Status'] = this._searchRecommendStatus;
    data['searchRecommend_Type'] = this._searchRecommendType;

    return data;
  }

}

class UserListEntity{

  int? _code;
  UserListResult? _data;
  String? _message;

  UserListEntity({int? code,UserListResult? data,String? message}){
    this._code = code;
    this._data = data;
    this._message = message;
  }

  int? get code => _code;
  set setCode(int? code)=>_code = code;
  String? get message => _message;
  set setMessage(String? message) => _message = message;
  UserListResult? get data =>_data;
  set getData(UserListResult? data) => _data = data;
  UserListEntity.fromJson(Map<String,dynamic> json){

    _code = json['code'];
    _data = json['data'] != null ?  UserListResult.fromJson(json['data']):null;
    _message = json['message'];

  }

  Map<String,dynamic> toJson(){
    final Map<String,dynamic> data = new Map<String,dynamic>();
    data['code'] = this._code;
    data['message'] = this._message;
    data['data'] = this._data!.toJson();

    return data;
  }

}

class UserListResult{
  List<UserData>? _userList;

  UserListResult({List<UserData>? userList,}){
    this._userList = userList;
  }

  List<UserData>? get userList =>_userList;
  set getData(List<UserData>? userList) => _userList = userList;

  UserListResult.fromJson(Map<String,dynamic> json){

    if(json['user_List'] != null){
      _userList = [];
      json['user_List'].forEach((e)=>{
        _userList!.add(UserData.fromJson(e))
      });
    }

  }

  Map<String,dynamic> toJson(){
    final Map<String,dynamic> data = new Map<String,dynamic>();
    if(data['user_List'] !=null){
      data['user_List'] = this._userList!.map((v) => v.toJson()).toList();
    }

    return data;
  }

}